<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>拾光</title>
	<meta name="Resource-type" content="Document" />
	<!-- <meta name="viewport" content="width=320"> -->
	<link rel="shortcut icon" href="favicon.ico" />
	<link rel="stylesheet" type="text/css" href="jquery.fullPage.css" />
	<link rel="stylesheet" type="text/css" href="animate.css" />
	<script src="jquery.min.js"></script>
	<script type="text/javascript">
		function isPC(){
			return(window.screen.availWidth >600);
		}
		var insert="",bottom="";
		if (isPC()) {
			document.write('<link rel="stylesheet" type="text/css" href="pc.css" />');
			insert='<div class="section fp-auto-height" id="section0"><img src="img/logo.png"/><span>轻便，拾光</span><div class="tab"><a href="index.html">首页</a><a href="team.html">拾光团队</a></div></div><div class="section" id="section1"><div class="section-body"><img id="section1-img" src="img/section1.png"/><div id="section1-div"><h1 id="section1-title">拾光</h1><p id="section1-desp">纯洁的校园工具集</p><div id="section1-qrcode-div"><div style="padding-left:10px;"><a href="javascript:void(0)" class="btn-android" onclick="downandroid()"><img src="img/android.png"/>下载安卓版</a><a href="javascript:void(0);" id="tp_service" class="btn-android" style="position:relative;margin-top:30px;"><img src="img/wx.png"/>“拾光”服务号<img id="tp_service_img" src="img/qrcode_for_tp.jpg" style="width:255px;height:255px;position:absolute;top:-120px;left:300px;display:none"/></a><a href="javascript:void(0)" class="zm btn-apple" id="btn-apple"><img src="img/apple.png"/>下载IOS版</a></div><img id="section1-qrcode" src="img/qrcode.png"/></div>';
			bottom='<div class="section fp-auto-height" id="section6" style="height:320px;padding:22px 152px;color:#51c5c4;position:relative;font-size:20px;"><img src="img/logo.png" style="height:100px;"/><span style="vertical-align:top;line-height: 100px;">轻便，拾光</span>			<div style="display:inline-block;position:absolute;text-align:center;color:#495265;font-size:16px;right:152px;margin-top:20px;"><p style="margin:5px 0;">Powered by <span style="cursor:pointer;color:#51c5c4">yantukeji.com</span></p><p style="margin:5px 0;">河北省秦皇岛市海港区</p><p style="margin:5px 0;">冀ICP备15024262号-1</p></div></div>';
			document.write('<link rel="stylesheet" type="text/css" href="pc.css" />');

		}else{
			insert='<div class="section" id="section1"><div style="padding:0 10%;text-align:center;font-size:2rem;position: relative;z-index: 999;"><img src="img/logobig.png" style="width:40%;margin-top:30%;"/><p style="color:#2ec4c5;margin:0px;font-size:4rem;line-height:5rem" class="iphone">拾光</p><p style="color:#b9bcc3;margin:0px;line-height:8rem;letter-spacing:20px;" class="iphone">纯洁的校园工具集</p><a href="javascript:void(0)" class="btn-android"  onclick="downandroid()"><img src="img/android.png"/>下载安卓版</a><a href="javascript:void(0)" class="btn-android wfw" id="btn-wx"><img src="img/wx.png"/>拾光服务号</a><a href="javascript:void(0)" class="zm btn-apple" id="btn-apple"><img src="img/apple.png"/>下载IOS版</a></div><img id="yhq" src="img/phone-section0.png"  /><img id="yhq" src="img/phone-section0.png"  /></div>';
			document.write('<link rel="stylesheet" type="text/css" href="phone.css" />');

		};

	</script>
	
</head>
<body>


<div id="fullpage">
	<div class="section" id="section2">
		<div class="section-body">
			<div id="section2-div" class="section-left-des">
				<h1 class="section-title">萌新专属通道</h1>
				<p>公共课表：公共基础课程提前看</p>
				<p>拾光问答：时刻准备、答疑解惑</p>
			</div>
			<img id="section2-img" class="section-right-img transform-right" src="img/section2.png"/>
		</div>
	</div>

	<div class="section" id="section3">
		<div class="section-body">
			<div id="section3-div" class="section-right-des">
				<h1 class="section-title" style="color:#FFF">校园学习必备</h1>
				<p>课表：导入课表随时看</p>
				<p>考试成绩：一键查询考试、成绩</p>
				<p>图书馆：及时提醒还书</p>
			</div>
			<img id="section3-img" class="section-left-img" src="img/section3.png"/>
		</div>
	</div>
	<div class="section" id="section4">
		<div class="section-body">
			<div id="section4-div" class="section-left-des">
				<h1 class="section-title">班级社团活动</h1>
				<p>活动：校园活动随时掌握</p>
				<p>社团：燕大社团信息轻松看</p>
			</div>
			<img id="section4-img" class="section-right-img transform-left" src="img/section4.png"/>
		</div>
	</div>
	<div class="section" id="section5">
		<div class="section-body">
			<div id="section5-div" class="section-right-des">
				<h1 class="section-title" style="color:#fff">拒绝枯燥无味</h1>
				<p>知乎：带你开启装X之旅</p>
				<p>PM2.5：厚德载雾，自强不吸</p>
				<p>动弹：畅弹校园百态~</p>
			</div>
			<img id="section5-img" class="section-left-img" src="img/section5.png"/>
		</div>
		<ul id="menu">
			<li><a href="#firstPage">返回顶部</a></li>
			<li><a href="team.html">团队简介</a></li>
		</ul>
	</div>
</div>
<script type="text/javascript" src="jquery.fullPage.min.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		$("#fullpage").prepend(insert);
		$("#fullpage").append(bottom);

		if (isPC()) {
			$("#section1-img").addClass("animated bounceInLeft");
			setTimeout(function(){
				$("#section1-img").removeClass("animated bounceInLeft");
			},3000);
			$('#fullpage').fullpage({
				navigation: true,
				navigationPosition: 'right',
				sectionsColor: ['#fff','#f7f7f7', '#f7f7f7', '#f7f7f7', '#f7f7f7', '#f7f7f7','#fff'],
				anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage','5thpage','6thpage', 'lastPage'],
				afterLoad: function(anchorLink, index){
					if(index>1 || index<7){
						var i=index-1;
						if (index%2) {
							$('#section'+i+'-img').animate({
								left: '0%'
							},800);
							$('#section'+i+'-div').animate({
								left: '0%'
							},800);						
						}else{
							$('#section'+i+'-img').animate({
								left: '0%'
							},800);
							$('#section'+i+'-div').animate({
								right: '0%'
							},800);							
						};

					}
				}
			});	
			$("#section1-qrcode-div a").hover(function(){
				$(this).addClass("shake animated");
			},function(){
				$(this).removeClass("shake animated");
			})

		}else{
			var userAgentInfo = navigator.userAgent;
		    if (userAgentInfo.indexOf('AndroidWeb') > 0) {
		        $("html").css("font-size","30%");
		        $("body").css("font-size","30%");
		        $(".section-title").css("font-size","20px");
		        $(".section-body").css("padding","50px 0 0 0");
		        $("a img").css({"width":"20px","margin":"0"});
		        $("a").css({"line-height":"28px","height":"24px","margin":"5px"});
		        $("#menu").hide();
		    }
			$('#fullpage').fullpage({
				'verticalCentered': false,
				sectionsColor: ['#47526b','#f7f7f7', '#f7f7f7', '#f7f7f7', '#f7f7f7', '#f7f7f7','#fff'],
				anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage','5thpage','6thpage', 'lastPage'],
				afterLoad: function(anchorLink, index){
					console.log("index="+index);
					if(index==1){
						$("#btn-apple").addClass("animated bounceInLeft");
						setTimeout(function(){
							$("#btn-apple").removeClass("animated bounceInLeft");
						},3000);
						$("#btn-android").addClass("animated bounceInLeft");
						setTimeout(function(){
							$("#btn-android").removeClass("animated bounceInLeft");
						},3000);
						$("#btn-wx").addClass("animated bounceInRight");
						setTimeout(function(){
							$("#btn-wx").removeClass("animated bounceInRight");
						},3000);
					}
					if(index>1 || index<7){
						$('#section'+index+'-img').animate({
							bottom: '11%'
						},500);
						$('#section'+index+'-div').animate({
							opacity:1
						},500);						

					}
				}
			});	
		};
		$("#tp_service").on("mouseover mouseout",function(event){
			if(event.type == "mouseover"){
				$("#tp_service_img").show()
			}else if(event.type == "mouseout"){
				$("#tp_service_img").hide();
			}
		})
		$(".zm").on("click",function(){
			alert("敬请期待~")
		})
		$(".wfw").on("click",function(){
			alert("请通过微信搜索‘拾光服务号’~")
		})		
	});
	function isWeiXin(){
	    var ua = window.navigator.userAgent.toLowerCase();
	    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
	        return true;
	    }else{
	        return false;
	    }
	}
	function closewxtip(){
		$("#tip").remove();
	}
	function downandroid(){
		if (isPC()) {
			window.location.href="http://7xs8aj.dl1.z0.glb.clouddn.com/ptime2.0_release_9.9.apk";
		}else{
			if (isWeiXin()) {
				$("body").prepend('<div id="tip" onclick="closewxtip()" class="tipwx"><img src="img/wxtip.png" style="width:100%"/></div>');			
			}else{
				location.href="http://7xs8aj.dl1.z0.glb.clouddn.com/ptime2.0_release_9.9.apk";
			}
			if (userAgentInfo.indexOf('AndroidWeb') > 0){
				alert("如果点击无效或下载失败，请用手机浏览器访问 http://timepicker.cn 进行下载");
			}
		};
	}
		
</script>

</body>
</html>
